<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>
<%@ page import="com.scalar.chiptrack.utils.ConfigManager"%>
<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type=text/css rel=stylesheet>

<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<script>

function closeWindow() {
    window.opener.document.customers_relationship_search.submit();
 	window.close();
}

var saved = false;
function save(){

	var form = document.odm_relationship;
	form.action.value = "saveodms";
    if( saved == false)
    {
        saved=true;
        form.submit();
    }
}
function reset(){
    document.odm_relationship.reset();
}
function closeWindow(form) {
    window.opener.document.customer_relationship_display.action.value = "EditCustomer";
    window.opener.document.customer_relationship_display.customerId.value = document.odm_relationship.customerId.value;
    window.opener.document.customer_relationship_display.submit();
    window.close();
}

</script>

<TABLE cellSpacing=0 cellPadding=0 width="40%" border="0">
  <TBODY>
  <TR>

<TD bgcolor="#ffffff">
<IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></TD>
<TD bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></TD>
<TD valign="top" width="100%">

<IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/clear.gif" width=500 border=0>
<BR>

<!-- from here your body starts -->

<center><span class="NArialW">Customer-<bean:message key="label.sales.endCustomer"/> Relationship</span></center>

<%--<img src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" height=20>--%>
<html:form name="odm_relationship" method="post" action="/customerRelationshipSearch.do" scope="request" type="com.scalar.chiptrack.sales.forms.CustomerRelationshipSearchForm" onsubmit="">
<!-- name="odm_relationship_display" method="post" action="/customerRelationshipSearch.do" scope="request" type="com.scalar.chiptrack.sales.forms.CustomerRelationshipSearchForm" onsubmit="javascript:return searchCustomer(document.customer_relationship_search);"> -->
<table border="0" width="85%" cellpadding=0 cellspacing=0 align="center">
 <tr>
	<td align=right>
		<a href="javascript:closeWindow(document.odm_relationship);"  onMouseOver="window.status='Click here to close this window';return true"><font class='NArialL'><b>[Close this window]</b></font></a>
	</td>
</tr>
<tr>
	<td>
		<chiptrack:info styleClass="NArialL" />
		<chiptrack:errors styleClass="NArialL" />
	</td>
</tr>

<tr class="NArialL"><td>&nbsp;</td></tr>
<tr class="NArialL"><td align="center">Customer Name:&nbsp;&nbsp;<%= (String)request.getAttribute("customerName")%></td></tr>
<tr class="NArialL"><td>&nbsp;</td></tr>

<tr><td>
<table width="75%" class="NArialL" align="center" border="0" >
<tr bgcolor=#993333 class="NArialL"><td><font color=#FFFFFF>List of <bean:message key="label.sales.endCustomer"/>'s</font></td></tr>
<logic:iterate id="CustomerRelationship" name="odmList">
	<tr>
		<td>
			<input type="checkbox" name="odmId" 
			value="<bean:write name="CustomerRelationship" property="childCustomerId" />"
			<bean:write name="CustomerRelationship" property="flag" />>
			<bean:write name="CustomerRelationship" property="childCustomerName" />
		</td>
	</tr>
</logic:iterate>
<tr><td>&nbsp;</td></tr>
 <tr><td>&nbsp;</td></tr>
<tr>
<td align="center">
<a href="javascript:save()" onmouseover="window.status='Click here to Save <bean:message key="label.sales.endCustomer"/> Relationships';return true" onmouseout="window.status='';return true" title="Click here to Save <bean:message key="label.sales.endCustomer"/> Relationships"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/save.gif" width="53" height="17"></a>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="javascript:reset()" onmouseover="window.status='Click here to Reset <bean:message key="label.sales.endCustomer"/> Relationships';return true" onmouseout="window.status='';return true" title="Click here to Reset <bean:message key="label.sales.endCustomer"/> Relationships"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/reset.gif" width="53" height="17"></a>
</td>
</tr>
<tr class="NArialL"><td>&nbsp;</td></tr>
<tr class="NArialL"><td>&nbsp;</td></tr>
<tr><td align="center"><a href="javascript:closeWindow(document.odm_relationship);" onMouseOver="window.status='Click here to close this window';return true" onmouseout="window.status='';return true" ><font class='NArialL'>Close this window</font></a></td></tr>
<%-- <tr><td align="center"><chiptrack:linkCustomer page="/customerRelationship.do?action=EditCustomer"  onmouseover="window.status='Click here to close this window';return true" onmouseout="window.status='';return true">Close this window</chiptrack:linkCustomer></td></tr>--%>
</table>
</td></tr>

</table>

<input type="hidden" name="customerId" value="<%= (String)request.getParameter("customerId")%>">
<input type="hidden" name="customerName" value="<%= (String)request.getParameter("customerName")%>">
<input type="hidden" name="action" value="">

</html:form>
</TR>

</TABLE>
</body>
</html>